Replace founder bulk delete with safer single-business flow#78
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UI changes\n- replaces the main founder reset action with a new
Delete one test/demo businesstool\n- adds a selectable founder-only business list with business name, owner email, real-vs-test/demo status, archive state, and permanent-delete warning\n- requires typing the exact business name before theDelete this businessbutton enables\n- movesDelete all current businessesinto an advanced founder reset disclosure instead of the primary destructive action\n\n## Safety rules\n- keeps hard delete limited to archived test/demo businesses through the existing server-side eligibility checks\n- keeps real customer businesses on the archive-first path and shows explicitArchive real customerscopy\n- preserves founder/admin authorization, tenant isolation, and existing cascade deletion behavior\n- keeps redirects outside catchable redirect-error paths so normal feedback does not surfaceNEXT_REDIRECT\n\n## Tests added\n- verifies the single-business delete card is exact-name gated and keeps hard delete narrow\n- verifies deleting one archived demo/test business leaves another business intact\n- verifies the delete action still requires admin auth, exact-name confirmation, and has no redirect-catching pattern\n- verifies the founder reset UI now prioritizes single-business delete and keeps bulk delete in advanced\n\n## Validation\n- npm run typecheck\n- npm run lint\n- npm test\n- npm run build\n\n## Remaining risks\n- the exact-name enable/disable behavior is client-side, so the server action still remains the final authority for confirmation and eligibility\n- the advanced bulk delete action still exists for founder use; it is de-emphasized and still protected, but it remains intentionally available for last-resort cleanup